package com.csl.xm.demo.base.controller;

import com.csl.xm.demo.base.utils.StateParameter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.ModelMap;

/**
 * <pre>
 * 描述：基础控制器
 * </pre>
 *
 * @类名：com.csl.xm.demo.base.BaseController
 * @作者： 1410HL0236
 * @创建日期: 2019/11/19 16:04
 */
public abstract class BaseController {

  protected final String success = StateParameter.SUCCESS;
  protected final String fail = StateParameter.FAULT;
  // 日志
  protected final Logger logger = LoggerFactory.getLogger(this.getClass());

  public ModelMap getModelMap(String status, Object data, String msg) {
    ModelMap modelMap = new ModelMap();
    modelMap.put("status", status);
    modelMap.put("data", data);
    modelMap.put("msg", msg);
    return modelMap;
  }
}


